fix: preserve pane title and close button when Agents, Activity, or Review is empty - #77
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes empty-state pane rendering so pane headers (title + trailing close control) remain visible even when Agents/Activity/Review panes (or the PaneContent store) are empty, preventing undismissable panes.
Changes:
- Wrap empty-state early returns in
AgentsPane,ActivityPane, andReviewPanewith aPaneHeading+FamilyEmptycolumn layout. - Update
PaneContent’ssessionId === null || store === nullfallback to render the same header structure. - Make
FamilyEmptyaccept an optionalclassNameso empty states can participate correctly in flex layouts; add a regression test covering the four empty cases.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| apps/web/test/pane-empty-states.test.tsx | Adds regression tests asserting headers + close control render in all targeted empty states. |
| apps/web/src/features/panes/ReviewPane.tsx | Ensures Review empty state still renders PaneHeading (incl. trailing close). |
| apps/web/src/features/panes/PaneContent.tsx | Ensures no-store/no-session fallback renders PaneHeading + empty content. |
| apps/web/src/features/panes/FamilyEmpty.tsx | Adds className support to allow flexible sizing (min-h-0 flex-1) when wrapped. |
| apps/web/src/features/panes/AgentsPane.tsx | Ensures Agents empty state still renders PaneHeading (incl. trailing close). |
| apps/web/src/features/panes/ActivityPane.tsx | Ensures Activity empty state still renders PaneHeading (incl. trailing close). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+85
to
+88
| <div className="flex h-full min-h-0 flex-col"> | ||
| <PaneHeading family={family} trailing={trailing} /> | ||
| <FamilyEmpty className="min-h-0 flex-1" family={family} /> | ||
| </div> |
Collaborator
Author
There was a problem hiding this comment.
The outer container uses h-full min-h-0 to fill the panel, while FamilyEmpty is adjusted to min-h-0 flex-1 to sit within the flex structure without causing column scroll/height overflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
AgentsPane,ActivityPane, andReviewPaneearly empty checks to return a flex column structure containing<PaneHeading ... />followed by the<FamilyEmpty ... />view instead of returning the unadorned<FamilyEmpty ... />wrapper directly.PaneContent'ssessionId === nullearly check in the same header structure to ensure that the panel title and desktop close buttons are rendered.FamilyEmptysizing: Updated the childFamilyEmptyview to usemin-h-0 flex-1rather than forcingh-fullinternally to prevent column scroll overflows inside theh-fullwrapper.apps/web/test/pane-empty-states.test.tsxcontaining isolated stores viacreateInspectorStoreto verify thatPaneHeadingtitles and the custom close buttons are rendered in all four empty state cases.Why
How you verified it
pane-empty-states.test.tsxand ran it successfully: all 4 test cases verified the presence of pane labels and close button markup.pnpm check.pnpm --filter @t4-code/web test.Checklist